using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace Evolution.Engine.Objects
{
    public class Attribute
    {
        private float _Value;
        private string _Name;

        public string Name { get { return _Name; } set { _Name = value; } }
        public float Value { get { return _Value; } set { _Value = value; } }

        public Attribute(string Name, float Value)
        {
            _Name = Name;
            _Value = Value;
        }
    }

    public class AttributeCollection : Collection<Attribute> 
    {
        public void Add(Attribute attr)
        {
            foreach (Attribute attrib in Items)
            {
                if (attrib.Name == attr.Name)
                {
                    return;
                }
            }

            base.Add(attr);
        }
    }
}
